projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6110980
)
gdk: Add gdk_device_get_timestamp
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 26 Mar 2021 02:39:15 +0000
(22:39 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 26 Mar 2021 15:09:05 +0000
(11:09 -0400)
Give each device a timestamp that reflects the last
user activity with that device, as reflected in the
events that are produced for this device.
gdk/gdkevents.c
patch
|
blob
|
history
diff --git
a/gdk/gdkevents.c
b/gdk/gdkevents.c
index f7abfe75b55ac050178228d91a02c5243a407eab..43e9c9f01a8d9c50515cdb936a75eed641691ded 100644
(file)
--- a/
gdk/gdkevents.c
+++ b/
gdk/gdkevents.c
@@
-414,6
+414,9
@@
gdk_event_alloc (GdkEventType event_type,
event->device = device != NULL ? g_object_ref (device) : NULL;
event->time = time_;
+ if (device != NULL && time_ != GDK_CURRENT_TIME)
+ gdk_device_set_timestamp (device, time_);
+
return event;
}